﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Jack.RedisEventBus
{
    /// <summary>
    /// 事件存储
    /// </summary>
    public interface IEventStore : IDisposable
    {
        /// <summary>
        /// 添加事件处理类型
        /// </summary>
        Task AttachEventHandle(string eventType, Type eventHandlerType);
        /// <summary>
        /// 根据事件名称获取事件处理者
        /// </summary>
        /// <param name="eventType">事件类型</param>
        /// <returns>事件处理者</returns>
        Task<List<IEventHandle>> GetEventHandles(string eventType);
    }
}
